package com.xk5156.widget;

import android.text.TextUtils;
import android.view.ViewStub;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class WidgetActivity extends AppCompatActivity {
  private ViewStub vs_wave_view;
  private String label;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_widget);
    label = getIntent().getStringExtra(Constants.KEY_WIDGET_LABEL);
    initViews();
  }

  private void initViews() {
    vs_wave_view=findViewById(R.id.vs_wave_view);
    if(TextUtils.isEmpty(label)){
      return;
    }
    switch (label){
      case Constants.WIDGET_WAVE_VIEW:
        vs_wave_view.inflate();
        break;
      default:break;
    }
  }
}